﻿<%@ Page Title="" Language="VB" MasterPageFile="~/masterpages/Main.master" AutoEventWireup="false"
    CodeFile="addFamily.aspx.vb" Inherits="family_admin_addFamily" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ObjectDataSource ID="dsFamily" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetFamilyById" TypeName="MainDbTableAdapters.FamiliesTableAdapter"
        UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_FamilyId" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="PFamilyId" Type="Int32" />
            <asp:Parameter Name="FamilyName" Type="String" />
            <asp:Parameter Name="Mother" Type="String" />
            <asp:Parameter Name="Father" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="State" Type="String" />
            <asp:Parameter Name="Zip" Type="String" />
            <asp:Parameter Name="Phone1" Type="String" />
            <asp:Parameter Name="Phone2" Type="String" />
            <asp:Parameter Name="MemberCount" Type="Int32" />
            <asp:Parameter Name="Original_FamilyId" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="1" Name="FamilyId" QueryStringField="familyId"
                Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="PFamilyId" Type="Int32" />
            <asp:Parameter Name="FamilyName" Type="String" />
            <asp:Parameter Name="Mother" Type="String" />
            <asp:Parameter Name="Father" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="State" Type="String" />
            <asp:Parameter Name="Zip" Type="String" />
            <asp:Parameter Name="Phone1" Type="String" />
            <asp:Parameter Name="Phone2" Type="String" />
            <asp:Parameter Name="MemberCount" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="dsParentFamilies" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetFamilies" 
        TypeName="MainDbTableAdapters.FamiliesTableAdapter"></asp:ObjectDataSource>
    
    <div class="fullContent">
        <h1>Add Family</h1>
        <asp:FormView ID="frmFamily" runat="server" DataSourceID="dsFamily" DataKeyNames="FamilyId">
            <InsertItemTemplate>
                <div class="formRow">
                    <span class="formFieldShort">Parent Family:</span>
                    <asp:DropDownList ID="ddlParentFamily" runat="server"></asp:DropDownList>
                </div>
                <div class="formRow">
                    <span class="formFieldShort">FamilyName:</span>
                    <asp:TextBox ID="txtFamilyName" runat="server" Text='<%#Bind("FamilyName")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Mother:</span>
                    <asp:TextBox ID="txtMother" runat="server" Text='<%#Bind("Mother")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Father:</span>
                    <asp:TextBox ID="txtFather" runat="server" Text='<%#Bind("Father")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Address:</span>
                    <asp:TextBox ID="txtAddress" runat="server" Text='<%#Bind("Address")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">City:</span>
                    <asp:TextBox ID="txtCity" runat="server" Text='<%#Bind("City")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">State:</span>
                    <asp:TextBox ID="txtState" runat="server" Text='<%#Bind("State")%>' CssClass="adminTxtId" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Zip:</span>
                    <asp:TextBox ID="txtZip" runat="server" Text='<%#Bind("Zip")%>' CssClass="adminTxtZip" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Phone1:</span>
                    <asp:TextBox ID="txtPhone1" runat="server" Text='<%#Bind("Phone1")%>' CssClass="adminTxtPhone" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Phone2:</span>
                    <asp:TextBox ID="txtPhone2" runat="server" Text='<%#Bind("Phone2")%>' CssClass="adminTxtPhone" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">MemberCount:</span>
                    <asp:TextBox ID="txtMemberCount" runat="server" Text='<%#Bind("MemberCount")%>' CssClass="adminTxtId" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">&nbsp;</span>
                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" /> | 
                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                </div>
            </InsertItemTemplate>
            <ItemTemplate>
                <div class="formRow">
                    <span class="formFieldShort">FamilyId:</span>
                    <asp:Label ID="lblFamilyId" runat="server" Text='<%#Eval("FamilyId")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">PFamilyId:</span>
                    <asp:Label ID="lblPFamilyId" runat="server" Text='<%#Eval("PFamilyId")%>' />
                    <asp:DropDownList ID="ddlParentFamily" runat="server"></asp:DropDownList>
                </div>
                <div class="formRow">
                    <span class="formFieldShort">FamilyName:</span>
                    <asp:Label ID="lblFamilyName" runat="server" Text='<%#Eval("FamilyName")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Mother:</span>
                    <asp:Label ID="lblMother" runat="server" Text='<%#Eval("Mother")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Father:</span>
                    <asp:Label ID="lblFather" runat="server" Text='<%#Eval("Father")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Address:</span>
                    <asp:Label ID="lblAddress" runat="server" Text='<%#Eval("Address")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">City:</span>
                    <asp:Label ID="lblCity" runat="server" Text='<%#Eval("City")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">State:</span>
                    <asp:Label ID="lblState" runat="server" Text='<%#Eval("State")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Zip:</span>
                    <asp:Label ID="lblZip" runat="server" Text='<%#Eval("Zip")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Phone1:</span>
                    <asp:Label ID="lblPhone1" runat="server" Text='<%#Eval("Phone1")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Phone2:</span>
                    <asp:Label ID="lblPhone2" runat="server" Text='<%#Eval("Phone2")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">MemberCount:</span>
                    <asp:Label ID="lblMemberCount" runat="server" Text='<%#Eval("MemberCount")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">&nbsp;</span>
                    <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" /> | 
                    <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" /> | 
                    <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="New" />
                </div>
            </ItemTemplate>
            <EditItemTemplate>
                <div class="formRow">
                    <span class="formFieldShort">FamilyId:</span>
                    <asp:Label ID="lblFamilyId" runat="server" Text='<%#Eval("FamilyId")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Parent Family:</span>
                    <asp:DropDownList ID="ddlParentFamily" runat="server"></asp:DropDownList>
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Family Name:</span>
                    <asp:TextBox ID="txtFamilyName" runat="server" Text='<%#Bind("FamilyName")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Mother:</span>
                    <asp:TextBox ID="txtMother" runat="server" Text='<%#Bind("Mother")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Father:</span>
                    <asp:TextBox ID="txtFather" runat="server" Text='<%#Bind("Father")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Address:</span>
                    <asp:TextBox ID="txtAddress" runat="server" Text='<%#Bind("Address")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formField">City:</span>
                    <asp:TextBox ID="txtCity" runat="server" Text='<%#Bind("City")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">State:</span>
                    <asp:TextBox ID="txtState" runat="server" Text='<%#Bind("State")%>' CssClass="adminTxtId" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Zip:</span>
                    <asp:TextBox ID="txtZip" runat="server" Text='<%#Bind("Zip")%>' CssClass="adminTxtZip" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Phone1:</span>
                    <asp:TextBox ID="txtPhone1" runat="server" Text='<%#Bind("Phone1")%>' CssClass="adminTxtPhone" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Phone2:</span>
                    <asp:TextBox ID="txtPhone2" runat="server" Text='<%#Bind("Phone2")%>' CssClass="adminTxtPhone" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">MemberCount:</span>
                    <asp:TextBox ID="txtMemberCount" runat="server" Text='<%#Bind("MemberCount")%>' CssClass="adminTxtId" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">&nbsp;</span>
                    <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" /> | 
                    <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                </div>
            </EditItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:FormView>
    </div>
</asp:Content>
